home *** CD-ROM | disk | FTP | other *** search
- /*
- File: LayoutEditLibrary.h
-
- Contains: layout edit library interfaces: a Simple layout editing based on the TextEdit model
-
- Written by: Dave Opstad, Eric Mader
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <2> 1/24/95 JD updated to latest GX 1.1 source (as of 16 Jan 1995)
- <1> 1/9/95 JD First checked in.
- */
-
- #ifndef __LAYOUTEDITLIBRARY__
- #define __LAYOUTEDITLIBRARY__
-
- #include <Types.h>
- #include <Memory.h>
- #include <GXTypes.h>
- #include "SelectionLibrary.h"
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /* for compatibility with old headers */
- #define layoutEditLibraryIncludes
-
- typedef Handle LayoutEditHandle;
-
- LayoutEditHandle NewLayoutEditHandle(
- long textRunCount,
- const short textRunLengths[],
- const void *text[],
- long styleRunCount,
- const short styleRunLengths[],
- const gxStyle styles[],
- long levelRunCount,
- const short levelRunLengths[],
- const short levels[],
- gxLayoutOptions *layoutOptions,
- gxPoint *position,
- gxStyle defaultStyle);
-
- LayoutEditHandle LayoutEditHandleFromLayout(gxShape layout);
-
- long GetLayoutEditHandle(
- LayoutEditHandle handle,
- void *text,
- long *styleRunCount,
- short styleRunLengths[],
- gxStyle styles[],
- long *levelRunCount,
- short levelRunLengths[],
- short levels[],
- gxLayoutOptions *layoutOptions,
- gxPoint *position);
-
- void SetLayoutEditHandle(
- LayoutEditHandle handle,
- long textRunCount,
- const short textRunLengths[],
- const void *text[],
- long styleRunCount,
- const short styleRunLengths[],
- const gxStyle styles[],
- long levelRunCount,
- const short levelRunLengths[],
- const short levels[],
- const gxLayoutOptions *layoutOptions,
- const gxPoint *position);
-
- void SetLayoutEditHandleParts(
- LayoutEditHandle handle,
- gxByteOffset oldStartOffset,
- gxByteOffset oldEndOffset,
- long newTextRunCount,
- const short newTextRunLengths[],
- const void *newText[],
- long newStyleRunCount,
- const short newStyleRunLengths[],
- const gxStyle newStyles[],
- long newLevelRunCount,
- const short newLevelRunLengths[],
- const short newLevels[]);
-
- void SetLayoutEditHandleSelectedParts(
- LayoutEditHandle handle,
- long newTextRunCount,
- const short newTextRunLengths[],
- const void *newText[],
- long newStyleRunCount,
- const short newStyleRunLengths[],
- const gxStyle newStyles[],
- long newLevelRunCount,
- const short newLevelRunLengths[],
- const short newLevels[]);
-
- void SetLayoutEditHandleShapeParts(
- LayoutEditHandle handle,
- gxByteOffset startOffset,
- gxByteOffset endOffset,
- gxShape insert);
-
- long GetLayoutEditHandleParts(
- LayoutEditHandle handle,
- gxByteOffset startOffset,
- gxByteOffset endOffset,
- void *text,
- long *styleRunCount,
- short styleRunLengths[],
- gxStyle styles[],
- long *levelRunCount,
- short levelRunLengths[],
- short levels[]);
-
- long GetLayoutEditHandleSelectedParts(
- LayoutEditHandle handle,
- void *text,
- long *styleRunCount,
- short styleRunLengths[],
- gxStyle styles[],
- long *levelRunCount,
- short levelRunLengths[],
- short levels[]);
-
- gxShape GetLayoutEditHandleShapeParts(
- LayoutEditHandle handle,
- gxByteOffset startOffset,
- gxByteOffset endOffset,
- gxShape dest);
-
- void LayoutEditRotateShape(LayoutEditHandle handle, Fixed degrees, Fixed translateX, Fixed translateY);
-
- void LayoutEditIdle(LayoutEditHandle handle);
-
- void LayoutEditClick(LayoutEditHandle handle, gxPoint hitDown, Boolean extend);
-
- void LayoutEditActivate(LayoutEditHandle handle);
-
- void LayoutEditDeactivate(LayoutEditHandle handle);
-
- void LayoutEditKey(LayoutEditHandle handle, char key);
-
- void LayoutEditUpdate(LayoutEditHandle handle);
-
- SelectionHandle LayoutEditGetSelection(LayoutEditHandle handle);
-
- void LayoutEditSetSelection(LayoutEditHandle handle, SelectionOffset start, SelectionOffset end);
-
- void LayoutEditSetSelectionHandle(LayoutEditHandle handle, SelectionHandle selection);
-
- gxViewPort GetLayoutEditViewPort(LayoutEditHandle handle);
-
- void LayoutEditSetStyle(LayoutEditHandle handle, gxStyle newStyle);
- void LayoutEditIncrementLevel(LayoutEditHandle handle);
- void LayoutEditDecrementLevel(LayoutEditHandle handle);
- void LayoutEditSetLevel(LayoutEditHandle handle, long level);
-
- void LayoutEditCut(LayoutEditHandle handle);
- void LayoutEditCopy(LayoutEditHandle handle);
- void LayoutEditPaste(LayoutEditHandle handle);
- void LayoutEditClear(LayoutEditHandle handle);
-
- void LayoutEditFromScrap(LayoutEditHandle handle);
- void LayoutEditToScrap(LayoutEditHandle handle);
-
- void DisposeLayoutEditHandle(LayoutEditHandle handle);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __LAYOUTEDITLIBRARY__ */
-